package com.ohuang.baseapp.view.refresh.HjRefresh;

import com.ohuang.baseapp.ResourceTable;
import com.ohuang.baseapp.view.refresh.HjRefresh.BaseRefreshLayout;
import ohos.agp.components.AttrSet;
import ohos.agp.components.Component;
import ohos.agp.components.LayoutScatter;
import ohos.agp.components.Text;
import ohos.app.Context;

public class TextRefreshLayout extends BaseRefreshLayout {
    private Context context;
    private Text text;

    public TextRefreshLayout(Context context) {
        super(context);
    }

    public TextRefreshLayout(Context context, AttrSet attrSet) {
        super(context, attrSet);
    }


    @Override
    public void init(Context context) {
        this.context=context;
        Component component = LayoutScatter.getInstance(context).parse(ResourceTable.Layout_ohrefresh_top_text, null, false);
        text = (Text) component.findComponentById(ResourceTable.Id_text);
        addComponent(component);
    }

    @Override
    public void setRefreshText(String str) {
        text.setText(str);
    }

    @Override
    public void setStartRefresh() {

    }

    @Override
    public void setFinishRefresh() {

    }
}
